﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class BoardUIForm : BaseUIForm
{
    private GameObject livings;
    private GameObject LivingsBoard;
    private GameObject Close;
    private void Awake()
    {
        CurrentUIType.UIForms_Type = UIFormType.PopUp;  //弹出窗体
        CurrentUIType.UIForm_LucencyType = UIFormLucenyType.Translucence;
        CurrentUIType.UIForms_ShowMode = UIFormShowMode.ReverseChange;
        livings = transform.Find("DataBoard/Livings").gameObject;
        LivingsBoard = GameObject.Find("Canvas/PopUp/LivingBoardItem");
        //Close = transform.Find("Close").gameObject;
    }
    private void Start()
    {
        livings.GetComponent<Button>().onClick.AddListener(OnClickLivings);
        //Close.GetComponent<Button>().onClick.AddListener(OnClickClose);
    }
    private void OnClickLivings()
    {
        OpenUIForm(UIFormConst.LivingsBoard);
        //LivingsBoard.transform.position = new Vector3(700, 260, 0);
    }
    private void OnClickClose()
    {
        Hiding();
        CloseUIForm(UIFormConst.LivingsBoard);
    }
}
